package com.atguigu.springcloud.service;

import org.springframework.stereotype.Service;

/**
 * @program: cloud2020
 * @description: TODO
 * @author: YuWenYi
 * @create: 2021-04-15 10:55
 **/
@Service
public class PaymentFallbackService implements PaymentHystrixService{

    //该服务降级如果不配置超时时间,那么会有一个默认的很短的超时时间(应该是1s),如果超过了此时间,客户端就不等了!
    @Override
    public String paymentInfo_OK(Integer id) {
        return "PaymentFallbackService ---> paymentInfo_OK-->fallback";
    }

    @Override
    public String paymentInfo_TimeOut(Integer id) {
        return "PaymentFallbackService ---> paymentInfo_TimeOut-->fallback";
    }
}
